package com.demo;

import java.util.concurrent.TimeUnit;

public class Run {
    public static void main(String[] args) throws InterruptedException {
        MyThread myThread = new MyThread();
        myThread.start();
        System.out.println("运行结束！");
    }
}

class MyThread extends Thread {

    public MyThread() {
        super();
        System.out.println("当前线程的名字=" + Thread.currentThread().getName());
    }

    @Override
    public void run() {
        System.out.println("当前线程的名字==" + Thread.currentThread().getName());
    }
}





